import argparse
import os

from walkfile import myfilter


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('path', nargs='*', help='destination and source')
    args = parser.parse_args() # will exit on error
 
    if os.name == 'nt':
        folders = [
            {'path':'bin','after':'elelfio.dll'}, 
            {'path':'build'}, {'path':'config'}, 
            {'path':'data'}, 
            {'path':'lib','after':'eleclfio.lib'}, 
            {'path':'maintenance'}, 
            {'path':'user','exclude':'include/3rdParty'}
        ]
    elif os.name == 'posix':
        folders = [
            {'path':'bin','after':'elecolf'}, 
            {'path':'build'}, 
            {'path':'config'}, 
            {'path':'data'}, 
            {'path':'lib','after':'libeleclfio.so'}, 
            {'path':'maintenance'}, 
            {'path':'user','exclude':'include/3rdParty'}
        ]
        
    myfilter(folders, (args.path[0]), (args.path[1]))